<?php include $this->admin_tpl('meta');?>
<title>基础</title>
</head>
<body>
<nav class="breadcrumb"><i class="yzm-iconfont yzm-iconai-home"></i> 首页 <span class="c-gray en">&gt;</span> 配置 <span class="c-gray en">&gt;</span> 万能表单配置 <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" ><i class="yzm-iconfont yzm-iconshuaxin"></i></a></nav>
<div class="page-container">
	<div class="cl tb-top"> <span class="l">
		<a href="javascript:;" onclick="yzm_open('添加表格','<?php echo U('diy_set',['action'=>'add_table']);?>','650','700')" class="btn btn-primary radius"><i class="yzm-iconfont yzm-icontianjia"></i> 添加表格</a>
	</span></div>
	<table class="table table-border table-bg table-hover">
		<thead>
			<tr class="text-c">
				<th>ID</th>
				<th>类型</th>
				<th class="text-l">表格名称</th>
				<th class="text-l">字段</th>
				<th>是否支持导出</th>
				<th>是否支持导入</th>
				<th class="text-l">管理员</th>
				<th>创建时间</th>
				<th>管理操作</th>
			</tr>
		</thead>
		<tbody>
			<?php 
			   foreach($data as $val){
			 ?>
			<tr class="text-c">
				<td><?php echo $val['id'];?></td>
				<td><?php echo $val['type'];?></td>
				<td class="text-l w_150"><?php echo $val['name'];?></td>
				<td class="text-l"><?php echo $val['field'];?></td>
				<td>
					<?php if($val['is_download']){ ?>
					<span class="yzm-status-enable" data-field="is_download" data-text="是|否" data-db="hr_diy" data-id="<?php echo $val['id'];?>" onclick="yzm_change_status(this,'public_change_status')"><i class="yzm-iconfont">&#xe81f;</i>是</span>
					<?php }else{ ?>
					<span class="yzm-status-disable" data-field="is_download" data-text="是|否" data-db="hr_diy" data-id="<?php echo $val['id'];?>" onclick="yzm_change_status(this,'public_change_status')"><i class="yzm-iconfont">&#xe601;</i>否</span>
					<?php } ?>
				</td>
				<td>
					<?php if($val['is_upload']){ ?>
					<span class="yzm-status-enable" data-field="is_upload" data-text="是|否" data-db="hr_diy" data-id="<?php echo $val['id'];?>" onclick="yzm_change_status(this,'public_change_status')"><i class="yzm-iconfont">&#xe81f;</i>是</span>
					<?php }else{ ?>
					<span class="yzm-status-disable" data-field="is_upload" data-text="是|否" data-db="hr_diy" data-id="<?php echo $val['id'];?>" onclick="yzm_change_status(this,'public_change_status')"><i class="yzm-iconfont">&#xe601;</i>否</span>
					<?php } ?>
				</td>
				<td class='text-l'><?php echo $val['adminnames'];?></td>
				<td><?php echo date('Y-m-d H:i:s',$val['add_time']);?></td>
				<td class="td-manage">
					<a title="编辑"  class="btn-mini btn-success ml-5" href="javascript:;" onclick="yzm_open('表格字段','<?php echo U('diy_set',array('id'=>$val['id'],'action'=>'add'));?>','900','700')" style="text-decoration:none">编辑字段</a>
					<a title="编辑"  class="btn-mini btn-success ml-5" href="javascript:;" onclick="yzm_open('编辑表格','<?php echo U('diy_set',array('id'=>$val['id'],'action'=>'add_table'));?>','900','700')" style="text-decoration:none">编辑表格</a>
					<a title="删除" href="javascript:;" onclick="yzm_confirm('<?php echo U('diy_del',array('id'=>$val['id']));?>', '确定要删除【<?php echo $val['name'];?>】吗？<br><span style=\'color:#ee3b3b\'><span class=\'yzm-iconfont yzm-iconshuoming\'></span> 删除所有表格！</span>',1,0)"  class="btn-mini btn-danger ml-5" style="text-decoration:none">删除</a>
				</td>
			</tr>
			<?php 
			   }		 
			?>	
		</tbody>
	</table>
	<?php if(!$data){ ?><div class="yzm_no_data"><i class="yzm-iconfont yzm-iconshuoming"></i> 暂无数据</div><?php } ?>
</div>
<?php include $this->admin_tpl('footer');?>
</body>
</html>